package com.huazhi.wzsnw.model;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Trainrecord {
    private String tid;

    private Date time;

    private String place;

    private String speaker;

    private String traintheme;

    private String meetingsign;

    private String image;

    private String video;

    private String timestring;

    public String getTid() {
        return tid;
    }

    public void setTid(String tid) {
        this.tid = tid == null ? null : tid.trim();
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place == null ? null : place.trim();
    }

    public String getSpeaker() {
        return speaker;
    }

    public void setSpeaker(String speaker) {
        this.speaker = speaker == null ? null : speaker.trim();
    }

    public String getTraintheme() {
        return traintheme;
    }

    public void setTraintheme(String traintheme) {
        this.traintheme = traintheme == null ? null : traintheme.trim();
    }

    public String getMeetingsign() {
        return meetingsign;
    }

    public void setMeetingsign(String meetingsign) {
        this.meetingsign = meetingsign == null ? null : meetingsign.trim();
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image == null ? null : image.trim();
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video == null ? null : video.trim();
    }

    public String getTimestring() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        if (time != null && timestring == null){
            return dateFormat.format(time);
        }
        return timestring;
    }

    public void setTimestring(String timestring) {
        this.timestring = timestring;
    }
}